[luv-303] feat: redesign multi-CLI install/uninstall menu into Detected + Not-installed sections#302
Conversation
…ed + Not-installed sections Replaces the flat "All / X only / Y only" list in `policies --install`'s multi-CLI prompt with a sectioned layout: a `Detected (N)` section with a yellow `★ Install for all N detected` aggregate row + green `●` rows, and (install action only) a `Not installed (M) · install hooks ahead of time` section with dim `○` rows so users can prep hooks for a CLI before it lands on PATH. Uninstall flow keeps showing only detected CLIs and now reads "Remove from all N detected" on its aggregate row. Cursor skips section headers — only lands on selectable rows. Refactors the option-building logic out of `promptCliTargetSelection` into a new exported `buildCliMenuOptions(detected, action)` so the layout rules (aggregate row only when `detected.length > 1`, undetected only when `action === "install"`) are unit-testable without driving the keypress loop. Adds 4 tests covering install-with-mix, uninstall, all-7-detected, and 1-detected-no-aggregate. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… for new sectioned layout Sync the description of the interactive multi-CLI selection prompt with the redesign in 6f60904: replace the "Both / All / X only / Y only" phrasing with the new "Detected (N) + Not installed (M)" sectioned layout, and note that the uninstall flow shows only the Detected section. translate-docs workflow will sync the 14 translated copies. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR redesigns the CLI selection menu for ChangesCLI Menu Selection Redesign
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 5-7: The changelog entry for the new policies --install UX is
missing the required PR number; edit the single-line entry in CHANGELOG.md that
describes the redesign (referencing src/hooks/install-prompt.ts and the exported
helper buildCliMenuOptions) to append the PR identifier in the mandated format,
e.g. change the multiline description to a single-line entry ending with "
(`#302`)"; ensure the final line follows the exact guideline "- <description>
(#<PR_number>)" format.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c075d395-fa5b-45ad-9148-053d18230881
📒 Files selected for processing (4)
CHANGELOG.md__tests__/hooks/install-prompt.test.tsdocs/configuration.mdxsrc/hooks/install-prompt.ts
…entry Per the project changelog convention (CLAUDE.md "Each entry should be a single line: a short description followed by the PR number") and a CodeRabbit review note on PR #302. Also folds the docs/configuration.mdx sync (commit f521630) into the same line so the entry mentions both deliverables of this PR rather than splitting them. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lock in the four entries currently staged under `## Unreleased` (Features #302, Fixes #303 + #300, Docs #281) by promoting them to a new `## 0.0.10-beta.5 — 2026-05-08` section, and add a fresh empty `## Unreleased` heading on top for the next cycle. Mirrors the post-#301 convention. Once merged, tag `v0.0.10-beta.5` on main → GitHub Release publishes to npm under the `beta` dist-tag and auto-bumps `package.json` to `0.0.10-beta.6` on main. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
policies --installwith a sectioned layout: aDetected (N)section with a yellow★ Install for all N detectedaggregate row + green●rows, and (install action only) aNot installed (M) · install hooks ahead of timesection with dim○rows so users can prep hooks for a CLI before it lands on PATH.promptCliTargetSelectioninto a new exportedbuildCliMenuOptions(detected, action)so the layout rules (aggregate row only whendetected.length > 1, undetected only whenaction === "install") are unit-testable without driving the keypress loop.docs/configuration.mdxto describe the new sectioned layout (translated copies will follow viatranslate-docs.yml).Preview
Install action with 2 of 7 detected (80-col width):
Test plan
bun run test:run— all 1531 tests pass (4 new tests in__tests__/hooks/install-prompt.test.tscover install-with-mix, uninstall-no-undetected, all-7-detected, and 1-detected-no-aggregate)bun run tsc— cleanbun run lint— 0 errors (1 pre-existing unrelated warning)bun run build— clean🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Refactor
Tests
Docs